package com.hackordie.commons.hardware.components;

import com.hackordie.constants.EComponentsType;

public class HardDisk extends AComponent {

    int totalCapacity;
    int usedCapacity;

    public HardDisk(String componentName, int energyToTurOn, int totalCapacity, int prize) {
        super(componentName, EComponentsType.HardDisk, energyToTurOn, prize);

        this.totalCapacity = totalCapacity;
        this.usedCapacity = 0;
    }

    public int getUsedCapacity() {
        return usedCapacity;
    }

    public void setUsedCapacity(int usedCapacity) {
        this.usedCapacity = usedCapacity;
    }

    public int getTotalCapacity() {
        return totalCapacity;
    }
    
    public int getAvailableCapacity() {
        return totalCapacity - usedCapacity;
    }

    @Override
    public String toString() {
        
        return super.toString() + "-" + 
                totalCapacity + "-" +
                usedCapacity; 
    }

}
